<template>
	<view class="bg-white">
		<cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">疫情实时数据</block></cu-custom>
		<image src="../../static/rank.png" mode="widthFix" style="width: 100%;"></image>
		<view class="cu-card dynamic">
			<view class="shadow">
				<view class="cu-list menu-avatar comment solids-top ">
					<block v-for="(itemObj,index) in list" :key="index">
						<view class='action margin text-lg text-bold text-center'>
							<text class='cuIcon-title text-blue'></text>{{itemObj.title}}<text class='cuIcon-title text-blue'></text>
						</view>
						<block v-for="(item,cindex) in itemObj.item" :key="cindex">
							<view class="cu-item" style="padding: 20rpx 40rpx;">
								<text>{{cindex+1}}</text>
								<view class="content">
									<view class="padding-sm radius text-sm shadow-blur">
										<view class="flex">
											<view class="flex-sub">
												<text>{{item.query}}</text>
												<text class="text-xs margin-left-sm">{{item.degree}}</text>
											</view>
										</view>
									</view>							
								</view>
								<template v-if="item.type < 1">
									<view class="cu-tag round bg-gray margin-left" style="left: -7px;"><text class="avatar-text"></text>普</view>
								</template>
								<template v-else-if="item.type == 1">
									<view class="cu-tag round bg-red margin-left" style="left: -7px;"><text class="avatar-text">热</text></view>
								</template>		
								<template v-else>
									<view class="cu-tag round bg-blue margin-left" style="left: -7px;"><text class="avatar-text">新</text></view>
								</template>	
							</view>		
						</block>
					</block>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {post,get} from '../../utils/index.js';
	var that
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			that = this;
			that.getInfoList();
		},
		methods: {
			getInfoList() {
				let url = '/common/self/baidu-opendata.json';
				get(url).then(res=>{
					this.list = res.data[0].list;
				})
			}
		}
	}
</script>

<style>

</style>
